#include"head.h"

void buynode()
{
	STLnode* List = NULL;
	STLweicha(&List, 1);
	STLprint(List);
	STLweicha(&List, 2);
	STLprint(List);
	STLweicha(&List, 3);
	STLprint(List);
	STLweicha(&List, 4);
	STLprint(List);
}

//int main()
//{
//	buynode();
//
//
//	return 0;
//}

int main()
{
    int nums1[6] = { 4,5,6,0,0,0 };
    int nums2[3] = { 1, 2, 3 };
    int last1 =  2;
    int last2 = 2;
    int last3 = 5;
    while (last1 >= 0 && last2 >= 0)
    {
        if (nums1[last1] > nums2[last2])
        {
            nums1[last3] = nums1[last1];
            last1--, last3--;
        }
        else
        {
            nums1[last3] = nums2[last2];
            last2--, last3--;
        }
    }
    while(last2 >= 0)
    {
        nums1[last3] = nums2[last2];
        last2--, last3--;
    }

	return 0;
}